import api from "@/api/index";

const defaultHeadUrl = "./src/assets/images/head-logo.jpg";

const setUrl = (url) => {
    if (url != null && url.indexOf("http") == -1) {
        url = api.baseURL + url;
    }
    return url;
}

const setDefaultHead = (url) => {
    if (url == null || url == "") {
        url = defaultHeadUrl;
    }
    return url;
}

export default {
    setUrl,
    setDefaultHead
}